﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace JoinBoxCurrency
{
    public static class DictionaryTools
    { 
        /// <summary>
        /// 判断字典的keys是否有重复项,有就可以不加入
        /// </summary>
        /// <param name="dic"></param>
        /// <param name="addkey"></param>
        /// <returns></returns>
        public static bool KeysAddBool(this Dictionary<string, string> dic, string addkey)
        {
            foreach (var key in dic.Keys)
            {
                if (key == addkey)
                {
                    return false;
                }
            }
            return true;
        }
    }
}
